00001 <?php 00002 /*--------------------------------------------------------------------------+ 00003 This file is part of eStudy. 00004 user/classes/class.userdataadapter.inc.php 00005 - Module group: Datenauszug 00006 - Description: Class "UserDataAdapter" 00007 - Version: $Id: class.userdataadapter.inc.php 1465 2009-01-19 14:58:31Z bkasteleiner $ 00008 - Author(s): Philipp Hoffmann <philipp.hoffmann@mni.fh-giessen.de> 00009 - Bjoern Kasteleiner <bjoern.kasteleiner@mni.fh-giessen.de> 00010 - Bjoern Rathjens <bjoern.rathjens@mni.fh-giessen.de> 00011 +---------------------------------------------------------------------------+ 00012 This program is free software; you can redistribute it and/or 00013 modify it under the terms of the GNU General Public License 00014 as published by the Free Software Foundation; either version 2 00015 of the License, or any later version. 00016 +---------------------------------------------------------------------------+ 00017 This program is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 GNU General Public License for more details. 00021 You should have received a copy of the GNU General Public License 00022 along with this program; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00024 +--------------------------------------------------------------------------*/ 00025 00026 require_once('iface.userdataprovider.inc.php'); 00027 00031 abstract class UserDataAdapter implements UserDataProvider { 00032 00038 public static function getBaseURL() { 00039 if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === '1' || strtolower($_SERVER['HTTPS'])=== 'on')) { 00040 return 'https://'.$_SERVER['HTTP_HOST']; 00041 } 00042 return 'http://'.$_SERVER['HTTP_HOST']; 00043 } 00044 00051 public static function executeQuery($query) { 00052 global $db; 00053 if(! $result = $db->get_results($query, ARRAY_A)) { 00054 $result = array(); 00055 } 00056 return $result; 00057 } 00058 } 00059 ?>
1.5.5